import axios from '@/http/axios'

/**
 * 关于设备接口的
 */

// 查询所有设备信息
export const postFindDevice = (data) => {
  return axios({
    prefix: '/actual',
    url: '/tEquipment/findPage',
    method: 'post',
    data
  })
}

// 新增设备
export const postAddDevice = (data) => {
  return axios({
    prefix: '/actual',
    url: '/tEquipment/save',
    method: 'post',
    data
  })
}

// 删除设备
export const postDeleteDevice = (data) => {
  return axios({
    prefix: '/actual',
    url: '/tEquipment/delete',
    method: 'post',
    data
  })
}

// 获取设备信息
export const getDeviceInfo = (params) => {
  return axios({
    prefix: '/actual',
    url: '/tEquipment/findById',
    method: 'get',
    params
  })
}

// 根据厂房获取车间和设备
export const getCurrentEquipments = (params) => {
  return axios({
    prefix: '/actual',
    url: '/tFactory/getCurrentEquipments',
    method: 'get',
    params
  })
}
